< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03100900.xhp

(section: csng) (bookmark: bm_id3153753)
CSng function

CSng function

CSng Function[Runtime]
CSng 関数 [実行時](hd_id3153753.1)

Converts any string or numeric expression to data type Single.
文字列および数値表式を、単精度の数値データに変換します。(par_id3149748.2)

(/section: csng)

Syntax:
構文:(hd_id3153255.3)

CSng (Expression)
CSng (Expression)(par_id3148983.4)

Return value:
戻り値:(hd_id3152347.5)

Single
単精度(par_id3153750.6)

Parameters:
パラメータ:(hd_id3146957.7)

Expression: Any string or numeric expression that you want to convert. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system.
Expression: 日付データに変換する文字列および数値表式。また文字列を変換する場合は、オペレーティングシステムが標準で使用する数の書式 (「123.5」など) でテキストを指定する必要があります。(par_id3153345.8)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3149514.9)

Sub ExampleCSNG
Sub ExampleCSNG(par_id3154142.10)

Msgbox CDbl(1234.5678)
Msgbox CDbl(1234.5678)(par_id3147573.11)

Msgbox CInt(1234.5678)
Msgbox CInt(1234.5678)(par_id3150772.12)

Msgbox CLng(1234.5678)
Msgbox CLng(1234.5678)(par_id3147531.13)

Msgbox CSng(1234.5678)
Msgbox CSng(1234.5678)(par_id3147265.14)

end sub
end sub(par_id3159414.15)


< Prev / Next >